/**
 * @description 自动import导入所有 vuex 模块
 */

import { createStore } from "vuex";

const modules = {};
const files = import.meta.glob("./modules/*.js", {
	eager: true,
	import: "default",
});
for (const path in files) {
	const module = await files[path];
	modules[path.replace(/(\.\/|modules\/|\.js)/g, "")] = module;
}
export default createStore({
	modules,
});
